package com.mzj.saas.mservice.backlog.repository;

import com.mzj.saas.mservice.backlog.entity.BacklogItemPropertyRentBill;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;


public interface BacklogItemPropertyRentBillRepository extends PagingAndSortingRepository<BacklogItemPropertyRentBill, Long>, JpaSpecificationExecutor<BacklogItemPropertyRentBill> {
    List<BacklogItemPropertyRentBill> findByRentBillIdInOrDepositBillIdIn(List<Long> rentBillId,List<Long> depositBillId);
    @Query(value = "select * from saas_backlog_item_property_rent_bill where (match_user_id is null  ) ", nativeQuery = true)
    List<BacklogItemPropertyRentBill> findByMatchUserId();

    List<BacklogItemPropertyRentBill> findByRentBillIdOrDepositBillId(Long rentBillId,Long depositBillId);

}
